class maxandminbean {
  bool success;
  String message;
  int code;
  List<Result> result;
  int timestamp;

  maxandminbean(
      {this.success, this.message, this.code, this.result, this.timestamp});

  maxandminbean.fromJson(Map<String, dynamic> json) {
    success = json['success'];
    message = json['message'];
    code = json['code'];
    if (json['result'] != null) {
      result = new List<Result>();
      json['result'].forEach((v) {
        result.add(new Result.fromJson(v));
      });
    }
    timestamp = json['timestamp'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['success'] = this.success;
    data['message'] = this.message;
    data['code'] = this.code;
    if (this.result != null) {
      data['result'] = this.result.map((v) => v.toJson()).toList();
    }
    data['timestamp'] = this.timestamp;
    return data;
  }
}

class Result {
  String id;
  String companyName;
  double queryAvg;
  double queryMax;
  String queryMaxDate;
  double queryMin;
  String queryMinDate;

  Result(
      {this.id,
        this.companyName,
        this.queryAvg,
        this.queryMax,
        this.queryMaxDate,
        this.queryMin,
        this.queryMinDate});

  Result.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    companyName = json['companyName'];
    queryAvg = json['queryAvg'];
    queryMax = json['queryMax'];
    queryMaxDate = json['queryMaxDate'];
    queryMin = json['queryMin'];
    queryMinDate = json['queryMinDate'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['companyName'] = this.companyName;
    data['queryAvg'] = this.queryAvg;
    data['queryMax'] = this.queryMax;
    data['queryMaxDate'] = this.queryMaxDate;
    data['queryMin'] = this.queryMin;
    data['queryMinDate'] = this.queryMinDate;
    return data;
  }
}
